﻿cmake_minimum_required (VERSION 3.20)
 
project(SharedMemoryDemo LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) 

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message("Setting build type to 'RelWithDebInfo' as none was specified.")
  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
  # Set the possible values of build type for cmake-gui
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
    "MinSizeRel" "RelWithDebInfo")
endif()

if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
    message(${CMAKE_BUILD_TYPE}) 
endif() 

add_executable(${PROJECT_NAME} 
    main.cc
    IPC.hpp
    IPC2.hpp
    SharedMemory.h
    SharedMemory.cpp 
    SharedMemoryImpl.h 
    SharedMemoryImpl_win.cpp 
    SharedMemoryImpl_posix.cpp    
    SystemSemaphore.h
    SystemSemaphore.cpp ../Timer_win/src/TimerTest.cc)
